/*
 * Copyright (c) 2018, apexes.net. All rights reserved.
 *
 *         http://www.apexes.net
 *
 */
package net.apexes.demo.codegen.querydsl.qvar.base;

import com.querydsl.core.types.PathMetadata;
import com.querydsl.core.types.PathMetadataFactory;
import com.querydsl.core.types.dsl.DateTimePath;
import com.querydsl.core.types.dsl.StringPath;
import net.apexes.commons.querydsl.sql.EnumePath;
import net.apexes.commons.querydsl.sql.TablePathBase;
import net.apexes.demo.codegen.entity.base.EntityBase;
import net.apexes.demo.codegen.entity.enums.StatusFlag;

import java.time.LocalDateTime;

/**
 * 
 * @author <a href="mailto:hedyn@foxmail.com">HeDYn</a>
 *
 */
public abstract class QEntityBase<E extends EntityBase> extends TablePathBase<E> {

    private static final long serialVersionUID = 1L;

    public final StringPath id = createString("id");
    
    public final EnumePath<StatusFlag> statusFlag = createEnume("statusFlag", StatusFlag.class);
    
    public final DateTimePath<LocalDateTime> crtTime = createDateTime("crtTime", LocalDateTime.class);

    public final StringPath crtWho = createString("crtWho");

    public final DateTimePath<LocalDateTime> updTime = createDateTime("updTime", LocalDateTime.class);

    public final StringPath updWho = createString("updWho");

    public final StringPath version = createString("version");
    
    public QEntityBase(Class<? extends E> type, String variable, String schema, String table) {
        this(type, PathMetadataFactory.forVariable(variable), schema, table);
    }

    public QEntityBase(Class<? extends E> type, PathMetadata metadata, String schema, String table) {
        super(type, metadata, schema, table);
    }

}
